From b92b16f659bcafa3e9ddb635ba82d719deb8562a Mon Sep 17 00:00:00 2001
From: David King <dking@redhat.com>
Date: Wed, 19 May 2021 10:15:54 +0100
Subject: [PATCH] Remove unused variable in xmlCharEncOutFunc

Fixes a compiler warning:

encoding.c: In function 'xmlCharEncOutFunc__internal_alias':
encoding.c:2632:9: warning: unused variable 'output' [-Wunused-variable]
 2632 |     int output = 0;

https://gitlab.gnome.org/GNOME/libxml2/-/issues/254
---
 encoding.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/encoding.c b/encoding.c
index cdff6ae7..5e50c153 100644
--- a/encoding.c
+++ b/encoding.c
@@ -2629,7 +2629,6 @@ xmlCharEncOutFunc(xmlCharEncodingHandler *handler, xmlBufferPtr out,
     int written;
     int writtentot = 0;
     int toconv;
-    int output = 0;
 
     if (handler == NULL) return(-1);
     if (out == NULL) return(-1);
@@ -2682,8 +2681,6 @@ retry:
         ret = -3;
     }
 
-    if (ret >= 0) output += ret;
-
     /*
      * Attempt to handle error cases
      */
-- 
GitLab

